<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>修改音乐信息</title>
</head>
<body>
<?php 


$row = $data['goods'];
$id=$row['gid']; 
  $goodsname=$row['goodsname'];
  $tid=$row['tid'];
  echo $tid;
  $brand=$row['brand'];
  $place=$row['place'];
  $intro=$row['intro'];
  $adddate=$row['adddate'];
  $pic='images/'.$row['pic'];
 
  //将查询结果显示在表单中
?>
    <form method="post" action="index.php?c=goods&m=updategoods" enctype="multipart/form-data">
    <table align="center" border="1" width="500">
    <caption><h2>修改音乐信息</h2></caption>
      <tr>
        <td width="20%">id</td>
        <td width="80%"><?php echo $id; ?>
        <input type="hidden" name="gid" value=<?php echo $id; ?>> 
        </td>
      </tr>
      <tr>
        <td>音乐信息：</td>
          <td><input type="text" name="goodsname" size="30" value=<?php echo $goodsname; ?>></td>
      </tr>
    <!-- <tr>
        <td>视频类型：</td>
        <td>
          <input type="checkbox" name="tid[]" value="电影"<?php if(strstr($tid,'1')) echo 'checked'; ?>>电影
          <input type="checkbox" name="tid[]" value="电视剧"<?php if(strstr($tid,'2')) echo 'checked'; ?>>电视剧
          <input type="checkbox" name="tid[]" value="动画片"<?php if(strstr($tid,'3')) echo 'checked'; ?>>动画片
          <input type="checkbox" name="tid[]" value="科技"<?php if(strstr($tid,'4')) echo 'checked'; ?>>科技
          <input type="checkbox" name="tid[]" value="原创"<?php if(strstr($tid,'5')) echo 'checked'; ?>>原创
        </td>
      </tr> -->
      <tr>
       <td width="150">音乐类别：</td>
       <td>
         <select name="tid" >
           <option value="0">请选择</option>
           <option value="1" <?php if($tid=='1') echo 'selected'; ?>>流行</option>
           <option value="2" <?php if($tid=='2') echo 'selected'; ?>>摇滚</option>
           <option value="3" <?php if($tid=='3') echo 'selected'; ?>>民谣</option>
           <option value="4" <?php if($tid=='4') echo 'selected'; ?>>怀旧</option>
           <option value="5" <?php if($tid=='5') echo 'selected'; ?>>治愈</option>
         </select>
       </td>
      </tr>
  
       <tr>
        <td>歌手：</td>
          <td><input type="text" name="brand" size="30" value=<?php echo $brand; ?>></td>
      </tr>
        <tr>
        <td>专辑：</td>
        <td>
          <input type="text" name="place" size="30" value= <?php echo $place; ?>>
        </td>
        </tr>
         <tr>
        <td width="150">音乐简介：</td>
        <td>
          <textarea name="intro" cols="40" rows="5"><?php echo $intro; ?></textarea>
        </td>
        </tr>
          <tr>
        <td>音乐上传日期：</td>
          <td><input type="text" name="adddate" size="30" value=<?php echo $adddate; ?>></td>
      </tr>
           <tr>
        <td width="150">专辑封面</td>
        <td>
          <img src="<?php echo $pic; ?>" width=100 height=80>
          <input type="file" name="pic">
        </td>
         </tr>
        <td width="150"></td>
        <td>
          <input type="submit" value="更新">
          <input type="reset"  value="重置">
        </td>
      </tr>
    </table>
  </form>  


     </body>                                                           
     </html>